home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.4 KB | 122 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: DrwDDCmd.h
- // Release Version: $ ODF 1 $
- //
- // Author: Mary Boetcher
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef DRWDDCMD_H
- #define DRWDDCMD_H
-
- // ----- FrameWork Includes -----
-
- #ifndef FWDRCMD_H
- #include "FWDrCmd.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class CDrawPart;
- class CDrawSelection;
- class CDrawSubscribeLink;
- class CDrawLinkManager;
- class CBaseShape;
- class CDrawContent;
-
- //========================================================================================
- // class CDrawDragCommand - for dragging
- //========================================================================================
-
- class CDrawDragCommand : public FW_CDragCommand
- {
- public:
-
- FW_DECLARE_AUTO(CDrawDragCommand)
-
- CDrawDragCommand(Environment* ev,
- CDrawPart* part,
- FW_CFrame* frame,
- CDrawSelection* selection,
- FW_Boolean canUndo);
-
- virtual ~CDrawDragCommand();
-
- // --- FW_CCommand overrides
- virtual void UndoIt(Environment* ev); // Override
- virtual void RedoIt(Environment* ev); // Override
- virtual void SaveUndoState(Environment* ev); // Override
- virtual void FreeUndoState(Environment *ev); // Override
-
- protected:
- CDrawPart* fDrawPart;
- CDrawSelection* fDrawSelection;
- CDrawContent* fDraggedContent;
- ODShape* fUpdateShape;
- };
-
- //========================================================================================
- // class CDrawDropCommand - for dropping
- //========================================================================================
-
- class CDrawDropCommand : public FW_CDropCommand
- {
- public:
-
- FW_DECLARE_AUTO(CDrawDropCommand)
-
- CDrawDropCommand(Environment* ev,
- CDrawPart* itsPart,
- FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* facet,
- const FW_CPoint& windowPoint,
- FW_Boolean canUndo);
-
- virtual ~ CDrawDropCommand();
-
- virtual void UndoIt(Environment* ev); // Override
- virtual void RedoIt(Environment* ev); // Override
- virtual void CommitUndone(Environment *ev); // Override
- virtual void SaveRedoState(Environment* ev); // Override
- virtual void FreeRedoState(Environment* ev); // Override
-
- // --- FW_CDropCommand overrides
- virtual FW_Boolean DoDrop(Environment* ev,
- ODStorageUnit* dropSU,
- const FW_CPoint& mouseDownOffset,
- const FW_CPoint& dropPoint,
- FW_Boolean isDropMove,
- short itemNumber);
-
- virtual FW_Boolean DoDroppedInSameFrame(Environment* ev,
- ODStorageUnit* dropSU,
- const FW_CPoint& mouseDownOffset,
- const FW_CPoint& dropPoint);
-
- virtual void DoDroppedPasteAs(Environment* ev,
- const FW_CPoint& mouseDownOffset,
- const FW_CPoint& dropPoint); // Override
-
- private:
- void OffsetSelection(Environment* ev, const FW_CPoint& delta);
- void RestoreDroppedShapes(Environment* ev);
-
- CDrawLinkManager* GetDrawLinkManager(Environment* ev) const;
-
- private:
- CDrawPart* fDrawPart;
- CDrawSelection* fDrawSelection;
- FW_CPoint fDropDelta;
- CDrawContent* fDroppedContent;
- CDrawSubscribeLink* fSavedLink;
- };
-
-
- #endif
-